package com.woniuxy.portal.common.enumeration;

/**
 * 枚举封装系统级别的状态码
 */
public enum SystemCode implements ResultCode {
    // 定义枚举对象
    SUCCESS(200, "操作成功"),
    FAIL(500, "操作失败");

    private Integer code;
    private String message;

    SystemCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    /**
     * 获取状态码
     */
    @Override
    public Integer getCode() {
        return this.code;
    }

    /**
     * 获取状态信息
     */
    @Override
    public String getMessage() {
        return this.message;
    }
}